if __FILE__ == $0
  require 'class.Log.rb'
  require 'class.Configuration.rb'
  require 'class.App.rb'
  
  log = Log.new('log.txt')
  log.debug('starting up application.')
  
  config = Configuration.new(log, 'config.' + ENV.to_hash['USER'] + '.txt')
  app = App.new(log, config)
  app.run
  
  log.debug('shutting down application.')
  log.write
end